package me.zhengjie.modules.system.rest;


import me.zhengjie.annotation.rest.AnonymousPostMapping;
import me.zhengjie.modules.system.service.TaskService;
import me.zhengjie.modules.system.service.dto.TaskSubmitVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/ocr")
public class OcrController {

    private RedisTemplate redisTemplate;
    private TaskService taskService;

    @AnonymousPostMapping("/submitTask")
    public ResponseEntity<Object> submitTask(@RequestBody TaskSubmitVo taskSubmitVo){
        taskService.submitTask(taskSubmitVo);
        return new ResponseEntity<>(HttpStatus.OK);
    }
}


